/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.code.server2client;

import com.baidu.bjf.remoting.protobuf.Codec;
import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.ProtobufProxy;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import java.io.IOException;
import java.util.List;

/**
 *
 * @author dragon
 */
public class PageDataProto {
    public static byte[] EnCode(PageDataProto msg) throws IOException{
        Codec<PageDataProto> Lcode = ProtobufProxy.create(PageDataProto.class);
        return Lcode.encode(msg);
    }
    public static PageDataProto DeCode(byte[] data) throws IOException{
        Codec<PageDataProto> Lcode = ProtobufProxy.create(PageDataProto.class);
        return Lcode.decode(data);
        
    }
    @Protobuf
    private long totalRows;
    @Protobuf
    private int maxNum;
    @Protobuf
    private int currentPage;
    @Protobuf
    private boolean moreRows;
    @Protobuf(fieldType = FieldType.BYTES)
    private List<byte[]> dataList;

    public List<byte[]> getDataList() {
        return dataList;
    }

    public void setDataList(List<byte[]> dataList) {
        this.dataList = dataList;
    }

    public long getTotalRows() {
        return totalRows;
    }

    public void setTotalRows(long totalRows) {
        this.totalRows = totalRows;
    }

    public int getMaxNum() {
        return maxNum;
    }

    public void setMaxNum(int maxNum) {
        this.maxNum = maxNum;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public boolean isMoreRows() {
        return moreRows;
    }

    public void setMoreRows(boolean moreRows) {
        this.moreRows = moreRows;
    }

}
